import type { PostPatientConsultOrderParams } from "@/types/consult";
import { defineStore } from "pinia";
import { ref } from "vue";

export const useConsultStore = defineStore('consult',
  ()=>{
    const illnessInfo =ref<Pick<PostPatientConsultOrderParams,'illnessDesc'|'illnessTime'|'consultFlag'|'pictures'>>({
      illnessDesc: '信琪辉疼',
      illnessTime: 1,
      consultFlag: 0,
      pictures: [],
    }) 
    // 问诊类型，医院类型，科室id
    const type = ref('')
    const illnessType = ref('')
    const depId = ref('')
    const patientId = ref('')
    // const consultInfo = ref<consultInfo>(initalValue.value)
    return {
      // consultInfo,
      initIllnessInfo: illnessInfo,
      type,
      illnessType,
      depId,
      patientId
    }
  },
  {
    persist:true//持久化
  }
)